#ifndef PROTOCOLEDITFORM_H
#define PROTOCOLEDITFORM_H


#include <QWidget>
#include <QTableWidget>
#include <QVariant>
#include "protocol.h"
#include "paramtypedelegate.h"

namespace Ui {
class ProtocolEditForm;
}

class ProtocolEditForm : public QWidget
{
    Q_OBJECT

public:
    explicit ProtocolEditForm(QWidget *parent = nullptr);
    ~ProtocolEditForm();

    void setProcotolItem(struProtocolItem protocolItem );
    struProtocolItem getProtocolItem();

signals:
    void nameChanged(const QString name);


private slots:
    void on_pushButton_AddParam_clicked();

    void on_pushButton_RemoveCurrentParam_clicked();

    void on_lineEdit_Name_editingFinished();

    void on_lineEdit_Note_editingFinished();

    void on_checkBox_IsArray_stateChanged(int arg1);

private:
    Ui::ProtocolEditForm *ui;

    void initParamTable(QTableWidget* table);

};

#endif // PROTOCOLEDITFORM_H


